#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavfilter/buffersink.h>
#include <libavfilter/buffersrc.h>
#include <libavutil/opt.h>
#include <libavutil/log.h>
#ifdef __cplusplus
}
#endif

#include <string>

struct point
{
    int x; //horizontal postion
    int y; //vertical position
};

struct rectangle
{
    point left_top;
    point right_bottom;
};

class ICodec
{
private:
    /* data */
public:
    ICodec(/* args */);
    virtual ~ICodec();
public:
    virtual AVMediaType get_codec_type() const = 0;
    virtual int  decode(AVPacket* pkt,AVFrame* frame,int eof,int& got,int* finished) = 0;
    virtual int  encode(const AVFrame*  frame, AVPacket* packet,int& got,int* finished) = 0;
private:
    std::string codec_name;   

};


